package project.ccso.top.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.RequiredArgsConstructor;

/**
 * 会员实体类
 * @author aibinxiao
 * @date 2018年8月23日 上午9:08:30
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Member {
	private Integer id;// 会员id
	private String phoneNumber;// 会员手机（登陆账号）
	private String password;// 会员登陆密码
	private String nickName;// 会员昵称
	private String portrait;// 会员头像（图片路径）
	private Integer sex;// 会员性别
	private String province;// 会员所在省份
	private String city;// 会员所在城市
	private String school;// 会员所在高校
	private Integer shieldStatus;// 会员屏蔽状态
	private String regTime;// 会员注册时间
	private String alterTime;// 会员资料最后修改时间
	
	public Member(String phoneNumber, String password, String province, String city, String school) {
		super();
		this.phoneNumber = phoneNumber;
		this.password = password;
		this.province = province;
		this.city = city;
		this.school = school;
	}
	
	public Object[] toObjects() {
		return new Object[] {this.phoneNumber, this.password, this.nickName, this.portrait, this.sex, this,province, this.city, this.school, this.shieldStatus, this.regTime, this.alterTime};
	}
	
	public Member(String phoneNumber, String password, String nickName, String portrait, int sex, String province,
			String city, String school) {
		this.nickName = nickName;
		this.password = password;
		this.phoneNumber = phoneNumber;
		this.province = province;
		this.school = school;
		this.sex = sex;
		this.city = city;
		this.portrait = portrait;
		
	}

	public Member(Integer id, String phoneNumber, String nickName, int sex, String portrait,String province,String city,String school) {
		this.id = id;
		this.phoneNumber = phoneNumber;
		this.nickName = nickName;
		this.sex = sex;
		this.portrait = portrait;
		this.province = province;
		this.school = school;
		this.city = city;
	}

	public Member(Integer id, String newPassword) {
		this.id = id;
		this.password = newPassword;
	}

}
